package com.jxt.myjxtmanager.utils;

import com.google.gson.Gson;

/**
 * Created by sks on 2015/12/23.
 */
public class GsonUtil {
    public static <T> T json2Bean(final String json, final Class<T> clss) {

        Gson gson = new Gson();
        T t = gson.fromJson(json, clss);
        return t;
    }

    public static String Bean2Json(Object obj) {
        Gson gson = new Gson();
        return gson.toJson(obj);
    }

}
